#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"
void test1() {
	SListNode* slist = NULL;

	SListNode* n1 = malloc(sizeof(SListNode));
	SListNode* n2 = malloc(sizeof(SListNode));
	SListNode* n3 = malloc(sizeof(SListNode));
	SListNode* n4 = malloc(sizeof(SListNode));
	SListNode* n5 = malloc(sizeof(SListNode));

	slist = n1;
	n1->next = n2;
	n2->next = n3;
	n3->next = n4;
	n4->next = n5;
	n5->next = NULL;

	n1->data = 1;
	n2->data = 2;
	n3->data = 3;
	n4->data = 4;
	n5->data = 5;
	SListPrint(slist);

	SListPushBuck(&slist, 6);
	SListPushBuck(&slist, 7);
	
	SListPrint(slist);
	SListPushFront(&slist, 0);
	SListPrint(slist);
	SListPopBack(&slist);
	SListPrint(slist);

	SListPopFront(&slist);
	SListPrint(slist);


	SListNode* ret = SListFInd(slist, 5);
	printf("%d ", ret->data);
}
int main() {
	test1();
}